﻿using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Anagramme.Converters;

namespace Anagramme.Common.Tests.Converters
{
    [TestClass]
    public class ListItemIndexConverterTests
    {
        [TestMethod]
        public void ConvertValueIncrements()
        {
            Random random = new Random();
            int value = random.Next(1000);
            int expected = value + 1;
            ListItemIndexConverter converter = new ListItemIndexConverter();
            
            object actual = converter.Convert(value, null, null, null);

            Assert.AreEqual(expected, actual);
        }

        [TestMethod]
        [ExpectedException(typeof(NotImplementedException))]
        public void ConvertBackFailed()
        {
            ListItemIndexConverter converter = new ListItemIndexConverter();
            object actual = converter.ConvertBack(null, null, null, null);
        }
    }
}
